package com.yawn.zdweb.controller.entity;

import java.io.Serializable;

/**
 * @author Created by yawn on 2018-01-26 15:23
 */
public class RestData extends RestResponse implements Serializable {

    private int first;

    private int size;

    private long total;

    public RestData(int code, Object data, int first, int size, long total) {
        super(code, null, data);
        this.first = first;
        this.size = size;
        this.total = total;
    }

    public static RestData newData(Object data, int first, int size, long total) {
        return new RestData(1, data, first, size, total);
    }

    public int getFirst() {
        return first;
    }

    public void setFirst(int first) {
        this.first = first;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }
}
